<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
 

  <h:head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Secured File Manager</title>

    <style type="text/css">
      @IMPORT url("style/style.css");
    </style>

  </h:head>

  <h:body>

    <div id="blueBar" >
      <div id="globalContainer">
        <div id="globalHeader">
          
          <c:if test="#{featureController.globalSearchActivated}">
	          <form id="searchForm" action="#" method="get" >
	            <div id="globalHeaderSearch" >
	              <input id="globalHeaderSearchInput" class="globalHeaderInput" type="text" name="searchRequest" size="30" />
	              <div id="globalHeaderSearchButtonContainer">
	                <input id="globalHeaderSearchButton" type="submit" value=" " />
	              </div>
	            </div>
	          </form>
          </c:if>
        
          <form id="authenticationForm" action="#" method="post">
            <div id="globalHeaderAuthentication">
              <span class="globalHeaderInputLabel">Login</span>
              <input id="globalHeaderUsernameInput" class="globalHeaderInput" type="text" />
              <span class="globalHeaderInputLabel">Password</span>
              <input id="globalHeaderPasswordInput" class="globalHeaderInput" type="password" />
              <div id="globalHeaderConnectionButtonContainer">
                <input id="globalHeaderConnectionButton" type="submit" value="Connection" />
              </div>
            </div>
          </form>
        </div>
        <div id="globalContent">
            <h:form>
          <div id="resourcesContainer">
            <div id="resourcesHeader">
              <span id="resourcesTitle">#{explorerController.currentLocation}</span>
            </div>
            <div id="resourcesContent">
                <h:dataTable class="resourcesDatagrid" id="resourcesDatagrid" value="#{explorerController.resources}"  var="item" 
                            columnClasses="resourceNameColumn,resourceSizeColumn,resourceModificationDateColumn,resourceDescriptionColumn">
                  <h:column id="nameColumn">
                    <f:facet name="header">
                      <h:outputLabel value="Name" />
                    </f:facet>
                    <h:commandLink styleClass="#{item.styleClass}" action="#{explorerController.processResource}" >
                       <f:param name="resourceId" value="#{item.id}" />
                       <h:outputText value="#{item.name}"/>
                    </h:commandLink>
                  </h:column>
                  <h:column id="sizeColumn">
                    <f:facet name="header">
                      <h:outputLabel value="Size" />
                    </f:facet>
                    <h:outputText value="#{item.formattedSize}" rendered="#{item.isFile}"/>
                  </h:column>
                  <h:column id="modificationDateColumn">
                    <f:facet name="header">
                      <h:outputLabel value="Modification date" />
                    </f:facet>
                    <h:outputText value="#{item.formattedModificationDate}" />
                  </h:column>
                  <h:column id="descriptionColumn">
                    <f:facet name="header">
                      <h:outputLabel value="Description" />
                    </f:facet>
                   <h:outputText value="" />
                 </h:column>
               </h:dataTable>
              </div>
          </div>
            </h:form>
        </div>
        <div id="globalFooter">
          <span id="globalFooterGenerationMetadata">Generated in 0.135s</span>
        </div>
      </div>
    </div>
  </h:body>

</html>